package com.mall.ware.feign;

import com.mall.common.utils.BaseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("mall-product")
public interface ProductFeignService {


    /**
     *   1) 让所有的请求过网关
     *      1.@FeignClient("mall-gateway")  给 mall-gateway 所在的机器发送请求
     *      2. /api/product/skuinfo/info/{skuId}
     *   2) 直接让后台指定服务处理
     *      1. @FeignClient("mall-product")
     *      2. /product/skuinfo/info/{skuId}
     *
     *
     *
     *
     * @param skuId
     * @return
     */

    @RequestMapping("/product/skuinfo/info/{skuId}")
    public BaseResult info(@PathVariable("skuId") Long skuId);





}
